from minings.factory import datapreprocess
from minings.utils import utility
from copy import deepcopy
import os,numpy,orange


class DExample(datapreprocess.GENDATA):
    def __init__(self,**kwargs):
        #Arbitrary properties
        self.datafile       = ""
        self.dataoption     = 0 #0:Whole classes except self.permremovelist,1:fixclass,2:both
        self.permremovelist = []
        self.fixedcls       = ""
        self.run            = None
        self.__dict__.update(kwargs)
        self.fullname       = self.datafile
        self.dset_folder    = "dataset\\example_datasets"
        self.resource_file  = os.path.join(self.dset_folder,self.datafile)
        super(DExample,self).__init__(self)
        self.dataProcessing()
    def data2orange(self):
        data = orange.ExampleTable(self.resource_file)
        return data
    
